Skip to content

Allow user to add additonal IAM policy #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

7adityaraj
Copy link

@7adityaraj 7adityaraj commented Apr 13, 2025

Description

Add enhancements to issue > #26 (comment)

User: arn:aws:sts::aws-acc-id:assumed-role/irsa-k8s-alb-prod/1744547382731549898 is not authorized to perform: elasticloadbalancing:SetRulePriorities on resource: arn:aws:elasticloadbalancing:ap-south-1:aws-acc-id:listener-rule/app/alb-prod/8db67800d053e98e/cb6e3eb9b0d22f03/d7bf97040d690e46 because no identity-based policy allows the elasticloadbalancing:SetRulePriorities action

to pass into module:

data "aws_iam_policy_document" "alb_additional_iam_policy" {
  statement {
    effect = "Allow"
    actions = [
      "elasticloadbalancing:SetRulePriorities",
    ]
    resources = ["*"]
  }
}

## input variable
additional_iam_policy = data.aws_iam_policy_document.alb_additional_iam_policy.json

Changes on IAM policies with this PR

{
      Action   = [
          "elasticloadbalancing:SetWebAcl",
          "elasticloadbalancing:RemoveListenerCertificates",
          "elasticloadbalancing:ModifyRule",
          "elasticloadbalancing:ModifyListener",
          "elasticloadbalancing:AddListenerCertificates",
      ]
      Effect   = "Allow"
      Resource = "*"
    },
  + {
      + Action   = "elasticloadbalancing:SetRulePriorities"
      + Effect   = "Allow"
      + Resource = "*"
    },
]
}

Type of change

  • A bug fix (PR prefix fix)
  • A new feature (PR prefix feat)
  • A code change that neither fixes a bug nor adds a feature (PR prefix refactor)
  • Adding missing tests or correcting existing tests (PR prefix test)
  • Changes that do not affect the meaning of the code like white-spaces, formatting, missing semi-colons, etc. (PR prefix style)
  • Changes to our CI configuration files and scripts (PR prefix ci)
  • Documentation only changes (PR prefix docs)

How Has This Been Tested?

Yes, added a terraform plan in PR description.

@aditya-enthu
Copy link

Hi @jaygridley @katapultcloud could you please review this PR?

@jaygridley
Copy link
Member

Hello @aditya-enthu, thank you for you contribution. Much appreciated. We are working on major refactoring of this addon in #29 which will allow attaching additional policies. Please, feel free to comment on the approach we are adding there. Thanks.

@aditya-enthu
Copy link

thank you @jaygridley , i think i am okay closing this PR for #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants